package com.demo.model;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.util.Date;
import java.util.Objects;

/**
 * @author 秋水浮萍
 * @version 1.0.0
 * @ClassName AgingNode.java
 * @Description 时效节点闹钟 ddd
 * @createTime 2021年04月26日 20:50:00
 */
@Data
public class AgingNode {
    private String claimsName;
    private String trueName;
    private String packageId;
    private String claimsNumber;
    private String telephone;
    private String borrowers;
    private String caseId;
    private String caseMessage;
    private String alarmId;
    private String alarmType;
    private String whetherLeft;
    private String alarmNote;
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "Asia/Shanghai")
    private Date beginTime;
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "Asia/Shanghai")
    private Date endTime;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "Asia/Shanghai")
    private Date createTime;

    /**
     * 还剩多少天
     */
    private int subTime;

    private String message;

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        AgingNode agingNode = (AgingNode) o;
        return subTime == agingNode.subTime && Objects.equals(packageId, agingNode.packageId) && Objects.equals(claimsNumber, agingNode.claimsNumber) && Objects.equals(borrowers, agingNode.borrowers) && Objects.equals(caseId, agingNode.caseId) && Objects.equals(caseMessage, agingNode.caseMessage) && Objects.equals(alarmId, agingNode.alarmId) && Objects.equals(alarmType, agingNode.alarmType) && Objects.equals(whetherLeft, agingNode.whetherLeft) && Objects.equals(alarmNote, agingNode.alarmNote) && Objects.equals(beginTime, agingNode.beginTime) && Objects.equals(endTime, agingNode.endTime) && Objects.equals(createTime, agingNode.createTime) && Objects.equals(message, agingNode.message);
    }

}

